const query = require("../index");

module.exports = {
  login(openid) {
    const sql = `INSERT INTO app_users (openid) VALUE(?)`;
    return query(sql, [openid]);
  },
  checkUser(openid) {
    const sql = `SELECT * FROM app_users WHERE openid=?`;
    return query(sql, [openid]);
  }
};
